Functions may call themselves in a RECURSIVE fashion. For example, a function to raise a floating-point number to an integral power may be written:
float expon(float x, int y)
{
if (y>0)
return x * expon(x,y-1);
else
return 1.;
}
The scope of the formal parameters (and local variables, if any) of a function is the body of the function, and separate values for these variables are maintained for each invocation of the function. Thus there is no conflict when passing the value y-1 as an argument to the expon() function, even though the identifier y is itself used as a parameter of the called function.